from wsgiref.simple_server import make_server


def application(environ, star_response):
    star_response('200 OK', [('Context-Type', 'text/html')])
    body = '<h1>hello %s<h1>' % (environ['PATH_INFO'][1:] or 'web')
    return [body.encode('UTF-8')]


if __name__ == '__main__':
    httpd = make_server('', 8000, application)
    print('web server star')
    httpd.serve_forever()
